/*
 * Copyright 2011 Michael Nitsche
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.abcsolutions.g5.node;

import java.util.Vector;

import de.abcsolutions.g5.node.NodeInfo2;

/**
 * @author Michael Nitsche
 * 01.03.2011	Created
 */
public class NodeList {

	private final Vector<NodeInfo2> list;


	public NodeList() {
		this.list=new Vector<NodeInfo2>();
	}


	public NodeInfo2 getNode(String id) {
		for(int i=0; i<list.size(); i++) {
			NodeInfo2 node=list.get(i);
			if(node.equals(id))
				return node;
		}
		return null;
	}

	public void addNode(NodeInfo2 node) {
		list.add(node);
	}

}
